staircase hackerrank solution in python